//
//  AppDelegate.swift
//  Sina
//
//  Created by 沈方武 on 15/9/27.
//  Copyright © 2015年 沈方武. All rights reserved.
//

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        // 创建窗口
        window = UIWindow(frame: UIScreen.mainScreen().bounds)
        window!.backgroundColor = UIColor.whiteColor()
        // 设置窗口的根控制器
        window!.rootViewController = MainTabBarController()
        // 显示窗口
        window!.makeKeyAndVisible()
        
        return true
    }

}

/**
定义一个用于调试阶段打印的方法,用于文件的出处和打印内容
*/
func SFWLog<T> (message:T, fileName:String = __FILE__, line:Int = __LINE__, method:String = __FUNCTION__) {

    #if DEBUG
    print("[\((fileName as NSString).lastPathComponent)]--[\(line)]--[\(method)]--:\(message)")
    #endif
    
}

